#pragma once
#include"binary_node.h"
template<class Entry>
class Binary_tree
{
public:
	Binary_tree();
	bool empty()const;
	void preorder(void (*visit)(Entry&));
	void inorder(void (*visit)(Entry&));
	void postorder(void (*visit)(Entry&));
	int size()const;
	void clear();
	int height()const;
	void insert(const Entry&);
	Binary_tree(const Binary_tree<Entry>& original);
	Binary_tree& operator = (const Binary_tree<Entry>& original);

	void Binary_tree<Entry>::recursive_inorder(Binary_node<Entry>* sub_root, void (*visit)(Entry&));
	void Binary_tree<Entry>::recursive_preorder(Binary_node<Entry>* sub_root, void (*visit)(Entry&));
	void Binary_tree<Entry>::recursive_postorder(Binary_node<Entry>* sub_root, void (*visit)(Entry&));

	Binary_node<Entry>* root;
};
